export interface Course {
  id: string
  title: string
  description: string
  instructor: {
    id: string
    name: string
    avatar?: string
  }
  coverImage?: string
  price: number
  level: 'BEGINNER' | 'INTERMEDIATE' | 'ADVANCED'
  category: string
  duration: number // 课程总时长（分钟）
  studentCount: number
  rating: number
  tags: string[]
  isEnrolled?: boolean
}

export interface Chapter {
  id: string
  courseId: string
  title: string
  description?: string
  order: number
}

export interface Lesson {
  id: string
  chapterId: string
  title: string
  description?: string
  videoUrl?: string
  duration: number // 课时时长（分钟）
  order: number
  isCompleted?: boolean
}

export interface CourseProgress {
  courseId: string
  studentId: string
  completedLessons: string[]
  overallProgress: number // 0-100
  lastAccessedAt: Date
}

export interface CourseReview {
  id: string
  courseId: string
  studentId: string
  rating: number
  comment: string
  createdAt: Date
  student: {
    id: string
    name: string
    avatar?: string
  }
}

export interface CourseFilter {
  page?: number
  pageSize?: number
  category?: string
  level?: 'BEGINNER' | 'INTERMEDIATE' | 'ADVANCED'
  priceRange?: {
    min?: number
    max?: number
  }
  sortBy?: 'rating' | 'studentCount' | 'price'
  searchQuery?: string
}
